package com.qf.spring2202.annotation.Impl;


import com.qf.spring2202.annotation.dao.UserDao;
import com.qf.spring2202.annotation.entity.User;
import com.qf.spring2202.annotation.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public User getUser(Integer id) {
        System.out.println("查询用户id");
        return userDao.getUserById(id);
    }

}
